meson: Don't execute post-install.py if cross compiling
authorMartin Storsjö <martin@martin.st>
Sun, 5 Apr 2020 19:57:22 +0000 (22:57 +0300)
committerMartin Storsjö <martin@martin.st>
Sun, 5 Apr 2020 19:57:22 +0000 (22:57 +0300)
meson.build

index 7eee560a6d0617d95c3c3b8e50f7640f1e828ca9..128c871c23a86046314701d508b6e573397854f0 100644 (file)
@@ -794,11 +794,15 @@ subdir('docs/tools')
 subdir('docs/reference')
 
 # Keep this in sync with post-install.sh expected arguments
-meson.add_install_script('build-aux/meson/post-install.py',
-                         gtk_api_version,
-                         gtk_binary_version,
-                         gtk_libdir,
-                         gtk_datadir)
+if not meson.is_cross_build()
+  meson.add_install_script('build-aux/meson/post-install.py',
+                           gtk_api_version,
+                           gtk_binary_version,
+                           gtk_libdir,
+                           gtk_datadir)
+else
+  message('Not executing post-install steps automatically when cross compiling')
+endif
 
 if host_machine.system() != 'windows'
   # Install Valgrind suppression files (except on Windows,